﻿package scripts{
	import flash.display.MovieClip;
	import com.greensock.TweenLite;
	import flash.events.Event;


	public class GeoTween extends MovieClip{
		private var _posY:Number;
		
		public function GeoTween() {
			// constructor code
			
			this.addEventListener(Event.ADDED_TO_STAGE,init);
		}
		private function init(e:Event):void{
			
			
		}
		public function showUp(pos_y:Number):MovieClip{
			this._posY=pos_y;
			TweenLite.delayedCall(1,delayedShow);
			return this;
		}
		private function delayedShow():void{
			//TweenLite.to(this,0.5,{y:this._posY,alpha:1,onComplete:displayCompleteHandler});
			
			//FadeIn in 0.5 sec
			TweenLite.to(this,0.5,{alpha:1,onComplete:displayCompleteHandler})
		}
		
		private function displayCompleteHandler():void{
			
		}
		public function dispear(pos_y:Number):MovieClip{
			this._posY=pos_y;
			//TweenLite.to(this,0.5,{y:this._posY, alpha:0,onComplete:dispearCompleteHandler});
			//FadeOut in 0.5 sec
			TweenLite.to(this,0.5,{alpha:0,onComplete:dispearCompleteHandler});
			return this;
		}
		private function dispearCompleteHandler():void{
			
		}

	}
	
}
